package zztest;

import java.io.File;

import javax.swing.JFileChooser;
import javax.swing.JFrame;

import org.weed.remote.ui.MediaPanel;

public class MediaPlayer {
	public static void main(String[] args) {
		JFileChooser fileChooser = new JFileChooser();
		int result = fileChooser.showOpenDialog(null);
		
		if (result == JFileChooser.APPROVE_OPTION) {
			File file = null;
			try {
				file = fileChooser.getSelectedFile();
			} catch (Exception e) {
				
			}
			
			if (file != null) {
				JFrame player = new JFrame("Sean's Media Player");
				player.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
				MediaPanel screen = new MediaPanel();
				screen.open(file);
				player.add(screen);
				player.setSize(300, 300);
				player.setVisible(true);
				screen.start();
			}
		}

	}
}
